<template>
  <div>
    <div style="width: 100%;text-align: right">
      <el-button size="mini" type="primary" @click="addBusiness">
        <i class="el-icon-plus"/>
        新建商机
      </el-button>
    </div>
    <el-table :data="businessData" v-loading="loading" style="width: 100%;margin-top: 8px">
      <el-table-column show-overflow-tooltip align="center" min-width="155" label="商机名称" prop="businessName"/>
      <el-table-column show-overflow-tooltip align="center" min-width="115" label="商机金额" prop="money"/>
      <el-table-column show-overflow-tooltip align="center" min-width="135" label="客户名称" prop="customerName"/>
      <el-table-column show-overflow-tooltip align="center" min-width="175" label="商机组" prop="typeName"/>
      <el-table-column show-overflow-tooltip align="center" min-width="175" label="商机阶段" prop="statusName"/>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'businessDrawerTable',
  components: {},
  props: {
    businessData: {
      type: Array
    },
    loading: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {}
  },
  // 在实例创建完成后被立即调用
  created() {

  },
  // 实例被挂在后调用
  mounted() {

  },
  // 方法
  methods: {
    // 添加商机
    addBusiness() {
      this.$emit('addBusiness')
    }
  }
}
</script>

<style scoped>

</style>
